import request from '@/utils/request'

export function list(data) {
  return request({
    url: '/product/task/list',
    method: 'post',
    data: data
  })
}
export function newlist(data) {
  return request({
    url: '/production/task/list',
    method: 'post',
    data: data
  })
}
export function listByPlan(data) {
  return request({
    url: '/production/task/listByPlan',
    method: 'post',
    data: data
  })
}
export function listForReportForWorkByPlan(data) {
  return request({
    url: 'production/reportForWork/listForReportForWorkByPlan',
    method: 'post',
    data: data
  })
}
export function listForStartWork(data) {
  return request({
    url: '/production/reportForWork/listForReportForWork',
    method: 'post',
    data: data
  })
}

export function addOrUpdate(data) {
  return request({
    url: '/product/task/addOrEdit',
    method: 'post',
    data: data
  })
}
export function newaddOrUpdate(data) {
  return request({
    url: '/production/task/addOrEdit',
    method: 'post',
    data: data
  })
}
export function remove(data) {
  return request({
    url: '/product/task/delete',
    method: 'post',
    data: { deleteIds: data }
  })
}
export function newremove(data) {
  return request({
    url: '/production/task/delete',
    method: 'post',
    data: { deleteIds: data }
  })
}
export function getInfo(data) {
  return request({
    url: '/product/task/' + data,
    method: 'get'
  })
}
export function newgetInfo(data) {
  return request({
    url: '/production/task/' + data,
    method: 'get'
  })
}
export function finish(data) {
  return request({
    url: '/production/task/finish/' + data,
    method: 'get'
  })
}
export function expiry(data) {
  return request({
    url: '/production/task/expiry/' + data,
    method: 'get'
  })
}
export function getByMaterialId(data) {
  return request({
    url: '/engineering/require/getByMaterialId/' + data,
    method: 'get'
  })
}
